From: Andrew Cooper Date: Mon, 27 Mar 2017 09:45:58 +0000 (+0100) Subject: x86/emul: Add feature check for clzero X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2390 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b988e88cc0;p=xen.git x86/emul: Add feature check for clzero Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 497cc77c65..7af8a4266d 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -1604,6 +1604,7 @@ static bool vcpu_has( #define vcpu_has_clwb() vcpu_has( 7, EBX, 24, ctxt, ops) #define vcpu_has_sha() vcpu_has( 7, EBX, 29, ctxt, ops) #define vcpu_has_rdpid() vcpu_has( 7, ECX, 22, ctxt, ops) +#define vcpu_has_clzero() vcpu_has(0x80000008, EBX, 0, ctxt, ops) #define vcpu_must_have(feat) \ generate_exception_if(!vcpu_has_##feat(), EXC_UD) @@ -5183,6 +5184,8 @@ x86_emulate( { unsigned long zero = 0; + vcpu_must_have(clzero); + base = ad_bytes == 8 ? _regs.r(ax) : ad_bytes == 4 ? _regs.eax : _regs.ax; limit = 0;